package com.huike.game.Activity;

import androidx.appcompat.app.AppCompatActivity;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.huike.game.R;

public class GameActivity7 extends AppCompatActivity {
    private ImageView ivLeftImage;
    private TextView tvLeftText;
    private TextView tvContentTitle;
    private ImageView ivRigthImage;
    private TextView tvRightText;
    private EditText et_game7_input;



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_game7);

        //初始化
        initIds();
    }

    @SuppressLint("SetTextI18n")
    private void initIds() {
        ivLeftImage = (ImageView) findViewById(R.id.iv_left_image);
        tvLeftText = (TextView) findViewById(R.id.tv_left_text);
        tvContentTitle = (TextView) findViewById(R.id.tv_content_title);
        ivRigthImage = (ImageView) findViewById(R.id.iv_rigth_image);
        tvRightText = (TextView) findViewById(R.id.tv_right_text);
        et_game7_input =  findViewById(R.id.et_game7_input);

        ivLeftImage.setImageResource(R.drawable.tiao);
        tvLeftText.setVisibility(View.GONE);

        tvContentTitle.setText("我的账户");

        ivRigthImage.setVisibility(View.GONE);
        tvRightText.setVisibility(View.GONE);
    }

//    查询点击
    public void query(View v){

    }
// 充值点击
    public void recharge(View v){
        String price = et_game7_input.getText().toString();

        int num = Integer.parseInt(price);

        if( !(num  >= 1 && num <= 999 && !price.startsWith("0")) ){
            Toast.makeText(this, "只能输入1到999之间的整数", Toast.LENGTH_SHORT).show();
        }

    }

}
